﻿using Avalonia;
using Avalonia.ReactiveUI;
using AvaloniaFrontEnd;
using CSConfig;
using System;
using System.Diagnostics;
namespace csmake;

class Program
{
    // Initialization code. Don't use any Avalonia, third-party APIs or any
    // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
    // yet and stuff might break.
    [STAThread]
    public static void Main(string[] args)
    {
        Host.HostInstance = new CsMakeHost();
        var componentExecuteResult = ComponentManager.CommandExecute(args);
        //BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
    }
    public class CsMakeHost : IHost
    {
        public void WriteLine(string? format, params string[] d)
        {
            Debug.WriteLine(format, d);
        }

        public void WriteLine(string? msg)
        {
            Debug.WriteLine($"{msg}");  
        }
    }
    public static AppBuilder BuildAvaloniaApp()
    {
        return AppBuilder.Configure<App>()
               .UsePlatformDetect()
               .WithInterFont()
               .LogToTrace()
               .UseReactiveUI();
    }
}
